<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<script>
  let arr = [{
      name: 'zs',
      age: 18,
      gender: '男'
    },
    {
      name: 'ls',
      age: 28,
      gender: '男'
    },
    {
      name: 'ww',
      age: 38,
      gender: '男'
    }
  ]
  const obj = {
    'name': '姓名',
    'age': '年龄',
    'gender': '性别'
  }
  const data = []
  return arr.forEach(item => {
    const obj2 = {}
    for (let k in item) {
      obj2[obj[k]] = item[k]
    }
    data.push(obj2)
  })

</script>

</html>
